#【练习】非固定数值计算
def nonfixed_num():
    sum = 0
    avg = None
    num = 0
    max_num = None
    min_num = None
    while True:
        flag = False
        n = input("请输入数字：")
        print(type(n))
        if n == "bye":
            break
        else:
            if n.startswith("-"): # -123123
                n = n[1:] # 123123
                flag = True
            if n.isdigit():
                n = int(n)
                if flag == True:
                    n *= -1
                num += 1
                sum += n
                if max_num == None:
                    max_num = n
                elif max_num < n:
                    max_num = n
                if min_num == None:
                    min_num = n
                elif max_num > n:
                    min_num = n

nonfixed_num()